﻿<Application x:Class="TSL.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainMenu.xaml">
    <Application.Resources>
         
    	<Style x:Key="MyButton" TargetType="{x:Type Button}">
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Grid>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectangle">
    											<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
    										</ObjectAnimationUsingKeyFrames>
    										<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
    											<EasingDoubleKeyFrame KeyTime="0" Value="0.2"/>
    										</DoubleAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Pressed">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="rectangle">
    											<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}"/>
    										</ObjectAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Disabled"/>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Rectangle Fill="{x:Null}" RadiusY="10" RadiusX="10" StrokeThickness="2" Stroke="{TemplateBinding BorderBrush}"/>
    						<Rectangle Fill="{TemplateBinding Background}" HorizontalAlignment="Stretch" Margin="5" RadiusY="10" RadiusX="10" Stroke="{x:Null}" StrokeThickness="0" VerticalAlignment="Stretch" Width="Auto"/>
    						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    						<Rectangle x:Name="rectangle" HorizontalAlignment="Stretch" Margin="5" RadiusY="10" RadiusX="10" Stroke="{x:Null}" StrokeThickness="0" VerticalAlignment="Stretch" Width="Auto" Fill="White" Opacity="0.4" Visibility="Hidden"/>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsFocused" Value="True"/>
    						<Trigger Property="IsDefaulted" Value="True"/>
    						<Trigger Property="IsMouseOver" Value="True"/>
    						<Trigger Property="IsPressed" Value="True"/>
    						<Trigger Property="IsEnabled" Value="False"/>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
         
    </Application.Resources>
</Application>
